package com.lily.user.api;

import com.lily.user.domain.UserDM;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

public interface UserDomainIApi {

    @RequestMapping(value = "/user/get-all", method = RequestMethod.GET)
    List<UserDM> getAll(UserDM userDM);

    @RequestMapping(value = "/user/add", method = RequestMethod.POST)
    UserDM add(UserDM userDM);

    @RequestMapping(value = "/user/page/{current}/{size}", method = RequestMethod.GET)
    List<UserDM> page(UserDM userDM, @PathVariable Integer current, @PathVariable Integer size);

    @RequestMapping(value = "/user/get-one", method = RequestMethod.GET)
    UserDM queryOne(UserDM userDM);

    @RequestMapping(value = "/user/update", method = RequestMethod.POST)
    UserDM update(UserDM userDM);

    @RequestMapping(value = "/user/delete", method = RequestMethod.POST)
    UserDM delete(UserDM userDM);
}
